@extends('admin.public.admin')
@section('main')
<!-- 内容 -->
<div class="mws-panel grid_8">

		<div class="mws-panel-header">
			<span><i class="icon-table"></i> 订单详情列表</span>
		</div>
        <div class="mws-panel-body no-padding">
            	<div id="DataTables_Table_1_wrapper" class="dataTables_wrapper" role="grid">

            <table class="mws-datatable-fn mws-table dataTable" id="DataTables_Table_1" aria-describedby="DataTables_Table_1_info">
                <thead>
                    <tr role="row">
		                    <th>商品名</th>
							<th>商品图片</th>
							<th>购买价格</th>
							<th>购买数量</th>
							<th>小计</th>
                    </tr>
                </thead>

                <?php 

					$number=0;
					$money=0;
			 	?>
            <tbody role="alert" aria-live="polite" aria-relevant="all">
            @foreach($data as $k=>$v)
              
            		<tr>
                    	 <td>{{$v['goodsname']}}</td>

						 <td>
							<img width="200px" src="{{$v['img']}}" alt="">
						 </td>

						<td>{{$v['price']}}</td>
						<td>{{$v['num']}}</td>
						<td>{{$v['price'] * $v['num']}}</td>

						<?php 
							$number+=$v['num'];

							$money+=$v['price'] * $v['num'];
						 ?>
                     
                    </tr>

              @endforeach

              	<tr>
						<td colspan='2'>合计</td>
						<td  align="right">总价：{{$money}}</td>
						
						<td colspan='2' align="left">商品总数：{{$number}}</td>
				</tr>
             </tbody>
           </table>
           </div>
      </div>
</div>

	@endsection